#ifndef APPLICATION_H_
#define APPLICATION_H_

#include <iostream>

#include "../SDLtoolkit/Event.h"
#include "../SDLtoolkit/SDLEngine.h"
#include "../SDLtoolkit/Window.h"
#include "../SDLtoolkit/widgets/Button.h"
#include "../SDLtoolkit/Widget.h"
#include "../SDLtoolkit/Surface.h"
#include "../SDLtoolkit/Timer.h"
#include "../common/Constantes.h"
#include "../common/Cliente/Client.h"
#include "../Server/Servidor.h"
#include "ActiveWindowsFactory.h"
#include "WindowHelper.h"

#include <string>



#define SERVER_MAX_QUEUE 10

class Application : public Thread{
public:

	Application(SDLEngine* engine);
	virtual ~Application();

private:
	virtual void* run();
	void terminar();

	void handleUserEvent(Event event);

	SDLEngine* engine;

	//Se utiliza solo si se crea el servidor.
	Servidor* server;

	//Solo para el cliente si es que hay
	Client* cliente;

};

#endif /* Application_H_ */
